import { createRouter, createWebHashHistory } from 'vue-router'
import Xp from '../views/Xp.vue'
import Xq from '../views/Xq.vue'
import Rx from '../views/Rx.vue'
import Zs from '../views/Zs.vue'

const routes = [
  {
    path:'/',
    redirect: '/xp',  // 重定向:重新指向其它path,会改变网址
  },
  {
    path: '/xp',
    component: Xp
  },
  {
    path: '/xq/:id',
    component: Xq
  },
  {
    path: '/rx',
    component: Rx
  },
  {
    path: '/zs',
    component: Zs
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
